import type { RouteRecordRaw } from "vue-router";
import { UserRoleEnum } from "@/enums"
import AdminUserPage from "@/views/admin/AdminUserPage.vue";
import AdminAppPage from "@/views/admin/AdminAppPage.vue";
import AdminUserAnswerPage from "@/views/admin/AdminUserAnswerPage.vue";
import AppStatisticsPage from "@/views/statistics/AppStatisticsPage.vue";

export const adminRoutes: Array<RouteRecordRaw> = [
  {
    path: "/admin/user",
    name: "用户管理",
    component: AdminUserPage,
    meta: {
      access: UserRoleEnum.ADMIN,
    },
  },
  {
    path: "/admin/app",
    name: "应用管理",
    component: AdminAppPage,
    meta: {
      access: UserRoleEnum.ADMIN,
    },
  },
  {
    path: "/admin/user_answer",
    name: "回答管理",
    component: AdminUserAnswerPage,
    meta: {
      access: UserRoleEnum.ADMIN,
    },
  },
  {
    path: "/app/statistic",
    name: "应用统计",
    component: AppStatisticsPage,
    meta: {
      access: UserRoleEnum.ADMIN,
    }
  },
]